Qualification (restriction) is used to define acceptable values for an XML element or attributeThe main qualifying format for XSD is as follows:xs:elementname= "XXX">element name - Xs:simpletype> xs:restrictionBase= "yyy">element Type -
XML is not unfamiliar to us, it has a wide range of uses in enterprise-class applications. Specifically, no longer said, the following describes the difference between dtd,xsd and XSD as an example to see the definition and use of spring.
1.DTD
One, XSD common data formatXs:stringxs:decimalxs:integerxs:booleanxs:datexs:timeSecond, simple elementsname= "xxx" type= "yyy" default= "AAA" Fixed= "bbb"/>whichXXX represents the element name,YYY represents the data format,AAA represents the
C # Use the xsd file to verify whether the XML format is correct,
C # Use the xsd file to verify whether the XML format is correct
Core sample code:C # code
// Create an xmlDocument
XmlDocument doc = new XmlDocument ();
// Create a claim
Simply put: XML Schema is a class of XML, which is also equivalent to the table structure pattern of relational tables. Most of the time it is possible for a program to automatically generate its XSD based on an existing XML, or to generate its
DTD is an effective method to ensure that the XML document format is correct. you can compare the XML document and DTD file to see whether the document complies with the specifications, and whether the elements and labels are correctly used.
1. DTD (
XSD-qualified xsd empty element
a composite element contains additional elements and/or attributes. What is a composite element.
A composite element is an XML element that contains other elements and/or attributes. There are four types of
For XSD, there are two ways to define a composite element:One, directly within the element declaration, this method can only use this elementxs:elementname= "Employee"> Xs:complextype> xs:sequence> xs:elementname= "FirstName"type=
I have been learning and using XML as a definition language for some time. As the complexity of my XML definition increases, I am eager to implement code prompts and verification in vs2010.
I was exposed to XMLSCHEMA last week to solve my own
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.